import InfoModal from '../../../components/InfoModal';
import { fetchOperateDetails } from './util';
import { FILE_RENDER, REASON_RENDER } from './renderUtil';
// 填写进度弹框---

export const showProgressInfoModal = async (id, operateRecordId) => {
    const dataSource = await fetchOperateDetails(id, operateRecordId);
    const columns = [
        {
            title: '当前进度',
            dataIndex: 'taskProgress',
            render: value => `${value}%`
        },
        {
            title: '进度说明',
            dataIndex: 'operateContent',
            render: REASON_RENDER
        },
        {
            title: '附件',
            dataIndex: 'taskOperateFile',
            render: FILE_RENDER
        }
    ];

    return InfoModal.showCommonModal({ columns, dataSource, title: '填写进度详情' });
};
